﻿#region Copyright 
/*-------------------------------------------------------------------------
* 命名空间名称/文件名:    SSPivot.Common/GlobalEnum 
* CLR版本:     4.0.30319.42000
* 机器名称:    DESKTOP-NHMLO8A
* 功 能：       N/A
* 类 名：       GlobalEnum
* 创建时间：  2025/5/22 10:05:30
* 版本号：      v1.0
* 创建人:        xulong
*-------------------------------------------------------------------------*/
#endregion
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SSPivot
{
    /// <summary>
    /// 区间模式
    /// </summary>
    public enum RangeMode
    {
        /// <summary>
        /// 开区间
        /// </summary>
        Open,

        /// <summary>
        /// 闭区间
        /// </summary>
        Close,

        /// <summary>
        /// 左开右闭区间
        /// </summary>
        OpenClose,

        /// <summary>
        /// 左闭右开区间
        /// </summary>
        CloseOpen
    }
    public enum Gender
    {
        /// <summary>
        /// 未知
        /// </summary>
        [Description("未知")]
        UnKnown = -1,
        [Description("男")]
        Boy=0,
        [Description("女")]
        Girl=1
    }
    /// <summary>
    /// Hash 类型
    /// </summary>
    public enum HashType
    {
        /// <summary>
        /// MD5
        /// </summary>
        MD5 = 0,

        /// <summary>
        /// SHA1
        /// </summary>
        SHA1 = 1,

        /// <summary>
        /// SHA256
        /// </summary>
        SHA256 = 2,

        /// <summary>
        /// SHA384
        /// </summary>
        SHA384 = 3,

        /// <summary>
        /// SHA512
        /// </summary>
        SHA512 = 4
    }

    /// <summary>
    /// 查询操作符
    /// </summary>
    public enum Operator
    {
        /// <summary>
        /// 等于
        /// </summary>
        [Description("等于")]
        Equal,
        /// <summary>
        /// 不等于
        /// </summary>
        [Description("不等于")]
        NotEqual,
        /// <summary>
        /// 大于
        /// </summary>
        [Description("大于")]
        Greater,
        /// <summary>
        /// 大于等于
        /// </summary>
        [Description("大于等于")]
        GreaterEqual,
        /// <summary>
        /// 小于
        /// </summary>
        [Description("小于")]
        Less,
        /// <summary>
        /// 小于等于
        /// </summary>
        [Description("小于等于")]
        LessEqual,
        /// <summary>
        /// 头匹配
        /// </summary>
        [Description("头匹配")]
        Starts,
        /// <summary>
        /// 尾匹配
        /// </summary>
        [Description("尾匹配")]
        Ends,
        /// <summary>
        /// 模糊匹配
        /// </summary>
        [Description("模糊匹配")]
        Contains,
        /// <summary>
        /// In
        /// </summary>
        [Description("In")]
        In,
        /// <summary>
        /// Not In
        /// </summary>
        [Description("Not In")]
        NotIn,
    }

    public enum SortType
    {
        /// <summary>
        /// 升序
        /// </summary>
        Asc,
        /// <summary>
        /// 降序
        /// </summary>
        Desc
    }

    /// <summary>
    /// 状态码枚举
    /// </summary>
    public enum StatusCodes
    {
        /// <summary>
        /// 操作失败
        /// </summary>
        [Description("操作失败")]
        Status0NotOk = 0,

        /// <summary>
        /// 操作成功
        /// </summary>
        [Description("操作成功")]
        Status1Ok = 1,

        /// <summary>
        /// 未登录（需要重新登录）
        /// </summary>
        [Description("未登录")]
        Status401Unauthorized = 401,

        /// <summary>
        /// 权限不足
        /// </summary>
        [Description("权限不足")]
        Status403Forbidden = 403,

        /// <summary>
        /// 资源不存在
        /// </summary>
        [Description("资源不存在")]
        Status404NotFound = 404,

        /// <summary>
        /// 系统内部错误（非业务代码里显式抛出的异常，例如由于数据不正确导致空指针异常、数据库异常等等）
        /// </summary>
        [Description("系统内部错误")]
        Status500InternalServerError = 500
    }
}
